evaluate trig functions